﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class MovaboFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As MovaboBE
        Dim tmpMovabo As MovaboBE = New MovaboBE()
        Try
            With tmpMovabo
                .Cantidad = convertDTFromDb.ConvertDecimal(dr.Item("Cantidad"))
                .ClaProduto = convertDTFromDb.ConvertString(dr.Item("ClaProducto"))
                .Descripcion = convertDTFromDb.ConvertString(dr.Item("Descripcion"))
                .IdAbono = convertDTFromDb.convertInt32(dr.Item("IdAbono"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IEPS = convertDTFromDb.ConvertDecimal(dr.Item("IEPS"))
                .Numero = convertDTFromDb.convertInt32(dr.Item("Numero"))
                .NumSerie = convertDTFromDb.ConvertString(dr.Item("NumSerie"))
                .Observac = convertDTFromDb.ConvertString(dr.Item("Observac"))
                .Partida = convertDTFromDb.convertInt32(dr.Item("Partida"))
                .PorcDesc = convertDTFromDb.ConvertDecimal(dr.Item("PorcDesc"))
                .PorcIVA = convertDTFromDb.ConvertDecimal(dr.Item("PorcIVA"))
                .PrecioUnitario = convertDTFromDb.ConvertDecimal(dr.Item("PrecioUnitario"))
                .Serie = convertDTFromDb.ConvertString(dr.Item("Serie"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Tipo = convertDTFromDb.ConvertString(dr.Item("Tipo"))
            End With
            Return tmpMovabo
        Catch ex As Exception
            Throw
        Finally
            tmpMovabo = Nothing
        End Try
    End Function
End Class
